Completed
Push — master ( 6d8164...bf7249 )
by Roy
03:26
created

wp-admin-wc-settings-checkout-stripe.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 0 Features 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 5
b 0
f 0
1
/**
2
 * External dependencies
3
 */
4
import { By } from 'selenium-webdriver';
5
import { WebDriverHelper as helper } from 'wp-e2e-webdriver';
6
import { WPAdminWCSettings } from 'wc-e2e-page-objects';
7
8
const ENABLE_SELECTOR = By.css( '#woocommerce_stripe_enabled' );
9
const TEST_PUBLISHABLE_KEY_SELECTOR = By.css( '#woocommerce_stripe_test_publishable_key' );
10
const TEST_PUBLISHABLE_SECRET_KEY_SELECTOR = By.css( '#woocommerce_stripe_test_publishable_secret_key' );
11
12
13
export default class WPAdminWCSettingsCheckoutStripe extends WPAdminWCSettings {
14
	constructor( driver, args = {} ) {
15
		super( driver, args );
16
	}
17
18
	checkEnable() {
19
		return helper.setCheckbox( this.driver, ENABLE_SELECTOR );
20
	}
21
22
	uncheckEnable() {
23
		return helper.unsetCheckbox( this.driver, ENABLE_SELECTOR );
24
	}
25
26
	setTestPublishableKey( testPublishableKey ) {
27
		return helper.setWhenSettable( this.driver, TEST_PUBLISHABLE_KEY_SELECTOR, testPublishableKey );
28
	}
29
30
	setTestPublishableSecretKey( testPublishableSecretKey ) {
0 ignored issues
show
Unused Code introduced by
The parameter testPublishableSecretKey is not used and could be removed.

This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.

Loading history...
31
		return helper.setWhenSettable( this.driver, TEST_PUBLISHABLE_SECRET_KEY_SELECTOR, testPublishableSecret );
0 ignored issues
show
Bug introduced by
The variable testPublishableSecret seems to be never declared. If this is a global, consider adding a /** global: testPublishableSecret */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
32
	}
33
}
34